In the present age, with the rapid development of information, how to precisely authenticate an identity of a person has become an urgent social problem, especially in the fields of e-commerce and social security. Facial recognition has attracted increasing attention due to the advantages of being not forged, being not easily lost, and a high time validity.
At present, many people wear glasses. This causes significantly reduced accuracy of facial recognition. Therefore, before facial recognition is performed, a pair of glasses that is worn always needs to be detected to ensure high accuracy of facial recognition.
In an existing glasses detection method, a monitoring-based machine learning algorithm is usually used. That is, a large quantity of samples is collected to train a model and an input face image is compared with the trained model, to determine whether a pair of glasses is worn in a face image.